package com.adcc.monitoragent.bean;





/**
 * url + username 唯一确定数据库
 * 数据库监控类，支持mysql，oracle等
 * 
 * @author charlie
 * 
 */
public class DatabaseBean extends BaseBean {
	private static final long serialVersionUID = 1L;
	/**
	 * 固定窜
	 */
	private String fixType = "db";
	private String url;// 地址
	private String username;// 用户描述
	private String keywords;// 关键字
	private String catalog;
	private String name;// 数据库产品名称
	private String version;// 数据库产品版本
	private String driverName;// 驱动名称
	private String driverVersion;// 驱动版本

	public DatabaseBean() {
		super();
	}

	public DatabaseBean(String key) {
		super();
		this.url = key;
	}
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	
	public String getCatalog() {
		return catalog;
	}

	public void setCatalog(String catalog) {
		this.catalog = catalog;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getDriverName() {
		return driverName;
	}

	public void setDriverName(String driverName) {
		this.driverName = driverName;
	}

	public String getDriverVersion() {
		return driverVersion;
	}

	public void setDriverVersion(String driverVersion) {
		this.driverVersion = driverVersion;
	}

	
	
	@Override
	public String toString() {
		return "DatabaseBean [fixType=" + fixType + ", url=" + url
				+ ", username=" + username + ", keywords=" + keywords
			    + ", catalog=" + catalog + ", name="
				+ name + ", version=" + version + ", driverName=" + driverName
				+ ", driverVersion=" + driverVersion + "]";
	}

	public String getFixType() {
		return fixType;
	}
	/**
	 * 获取关键字唯一标识
	 * @return
	 */
	public String buildKey() {
		return this.url;
	}
	/**
	 * 获取展现名称   ip+port
	 */
	public void setShowName() {
		setShowName("Database");
	}
}
